﻿using DexERP.Core;
using DexERP.EntityFramework;
using DexERP.EntityFramework.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DexERP.Services
{
    public class EmployeeService : IDisposable
    {
        public DexERPDbContext dbContext;
        public IRepository<Employee, long> repository;
        public Employee model { get; set; }
        public EmployeeService(string nameOrConnectionString)
        {
            dbContext = new DexERPDbContext(nameOrConnectionString);
            repository = new Repository<Employee, long>(dbContext);
            model = new Employee();
        }
        public void Dispose()
        {
            dbContext.Dispose();
        }
    }
}
